#ifndef PARSER_OBJECT_H
#define PARSER_OBJECT_H

#include <string>
#include <vector>

#include "Interfaces/IProgramParser.h"
#include "Exceptions/MaxParsedValueExceeded.h"

class ParserObject {
	int type;
	std::vector<std::string> values;
public:
	/// <summary>Creates a ParserObject with a generic error type</summary>
	ParserObject();

	/// <summary>Creates a ParserObject with type as specified</summary>
	/// <param name="type">A type as #defined in ProgramParserConfiguration.h as PARSER_OBJECT_TYPE_*</param>
	/// <see>ProgramParserConfiguration.h"</see>
	ParserObject(int type);

	/// <summary>Creates a ParserObject with type and values as specified</summary>
	/// <param name="type">A type as #defined in ProgramParserConfiguration.h as PARSER_OBJECT_TYPE_*</param>
	/// <param name="values">The values of the parsed program line</param>
	ParserObject(int type, std::vector<std::string> values);

	/// <summary>Returns the type of this instance of ParserObject</summary>
	int getType();

	/// <summary>Accesses the value[index] of this instance of ParserObject</summary>
	/// <param name="index">The index of the value</param>
	/// <exception cref="ExceptionMaxParsedValueExceeded" />
	std::string &operator[](unsigned int index);

	unsigned int size();
};

#endif